echo off

set SOLUTION_NAME=TennisSiteLists.wsp

REM Your Web Application Url
set URL=http://server:port/

echo %time% Retracting Solution %SOLUTION_NAME% ...
"c:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\STSADM.EXE" -o retractsolution -name %SOLUTION_NAME% -immediate -url %URL%

custom_timeout 20

echo %time% Deleting solution %SOLUTION_NAME% ...
"c:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\STSADM.EXE" -o deletesolution -name %SOLUTION_NAME%

if %errorlevel% NEQ 0 (
goto :FAIL
)

echo SUCCESS!
goto :END

:FAIL
echo Operation failed :(
goto :END


:END
pause